#ifndef __KNNCLASSIFIER_H__
#define __KNNCLASSIFIER_H__

#include "Classifier.h"
#include "Sample.h"

#include <vector>

class kNNClassifier : public Classifier
{
public:
  // Constructor, sets k to 1 as default
  kNNClassifier(const int& k = 1);
  virtual ~kNNClassifier();

  int getK() const;
  void setK(const int& k);

  virtual int test(const Sample& s) const;
  virtual void train(const DataSet& ds);
  
protected:
  int k_; // Number of neighbors to inspect
  std::vector<Sample> in_; // Samples
  std::vector<int> labels_; // Labels
};

#endif